import store from '@/store'

export default {
  install(Vue) {
    // 封装按钮权限自定义指令
    Vue.directive('allow', {
      inserted: (el, binding) => {
        const res = store.state.user.userInfo.roles.points
        // console.log(el, binding, res)
        if (!res.includes(binding.value)) el.remove()
      }
    })
  }
}
